<?php
/**
 * Created by PhpStorm.
 * User: server
 * Date: 2018/6/11
 * Time: 15:42
 */

namespace app\admin\controller;

require_once EXTEND_PATH . "/MfwApi/Openapi.php";

use think\Controller;
use think\Db;
use think\Request;


class MfwDemo extends Controller
{

    public function order_list_get()
    {
        $data = [];
        $data['page_no'] = 1;
        $data['page_size'] = 20;
        $data['params'] ['time_from']= '2018-04-01';
        $data['params'] ['time_to']= '2018-04-11';
        $mfwapi = new \app\common\model\MfwApi();
        $mfwapi->order_list_get($data);
    }
    public function order_detail_get()
    {
        $order_id="328012201806138115592";
        $mfwapi = new \app\common\model\MfwApi();
        $mfwapi->order_detail_get($order_id);
    }
    public function push_order_sync()
    {
        $mfwapi = new \app\common\model\MfwApi();
        $mfwapi->push_order_sync();

    }

    public function order_traveler_get()
    {
//        $result = Db::name('mfw_order')->field('order_id')->select();
//        $mfwapi = new \app\common\model\MfwApi();
//        foreach ($result as $k => $v) {
//            $mfwapi->order_traveler_get($v);
//            echo '<br>';
//        }

        $data['order_id'] = '328012201806138115592';
        $mfwapi = new \app\common\model\MfwApi();
        $mfwapi->order_traveler_get($data);
    }

    public function refund_list_get()
    {
        $data = [];
        $data['refund_status'] = 1;
        $data['page_no'] = 1;
        $data['page_size'] = 20;
        $mfwapi = new \app\common\model\MfwApi();
        $mfwapi->refund_list_get($data);
    }


}